<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>相对定位</title>
  <style>
    .red{
      width: 200px;
      height: 200px;
      background: aqua;
      position: relative;
      top:50px;
      left: 500px
    }
    .blue{
      width: 300px;
      height: 300px;
      background: yellowgreen;
    }
  </style>
</head>
<body>
<div class="red"></div>
<div class="blue"></div>
</body>
</html>